package cn.apestar.common.utils;

import java.util.Locale;

import org.springframework.context.MessageSource;
import cn.apestar.common.utils.SpringContextHolder;

public class MessageUtil {

    /**
     * 获取中文
     */
    public static String getMessage(String code) {
        MessageSource messageSource = SpringContextHolder.getBean("messageSource");
        return messageSource.getMessage(code, null, Locale.getDefault());
    }
}
